#ifndef PANEL_HPP
#define PANEL_HPP

#include <QWidget>
#include <QSignalMapper>
#include <QLabel>
#include <QGroupBox>
#include <QPushButton>
#include <QRadioButton>
#include <QSpinBox>
#include <QDoubleSpinBox>

class Panel : public QWidget
{
	Q_OBJECT
public:
	explicit Panel(QWidget *parent = 0);

	QSignalMapper	*sigmap;

	QGroupBox		*file;
	QLabel			*name;
	QPushButton		*open;
	QPushButton		*reset;
	QGroupBox		*front;
	QRadioButton	*cw;
	QRadioButton	*ccw;
	QGroupBox		*view;
	QRadioButton	*point;
	QRadioButton	*frame;
	QRadioButton	*solid;
	QGroupBox		*color;
	QSpinBox		*red;
	QSpinBox		*green;
	QSpinBox		*blue;
	QGroupBox		*trans;
	QDoubleSpinBox	*movx;
	QDoubleSpinBox	*movy;
	QDoubleSpinBox	*movz;
	QGroupBox		*rotat;
	QDoubleSpinBox	*rotx;
	QDoubleSpinBox	*roty;
	QDoubleSpinBox	*rotz;
	QGroupBox		*clip;
	QDoubleSpinBox	*nearer;
	QDoubleSpinBox	*farer;

signals:
	void setfilename(const char *fn);
	void setstruct(bool clockwise, char viewtype);
	void setcolor(int red, int green, int blue);
	void settrans(float x, float y, float z);
	void setrotat(float x, float y, float z);
	void setclip(float n, float f);
	void resetcam();
public slots:
	void initpara(double movxmin, double movxmax, double movymin, double movymax,
				  double movzmin, double movzmax, double nearmin, double farmax);
	void openfile();
	void getvalue(const QString &v);
	void resetpara();
};

#endif // PANEL_HPP
